#!/sbin/openrc-run
#
# Startup for QuickPage
#

OPTS_ARGS="q10"

PATH=/sbin:/usr/sbin:/bin:/usr/bin

start() {
	ebegin "Starting QuickPage daemon"
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec qpage -- ${OPTS_ARGS} >/dev/null
	eend $?
}

stop() {
	ebegin "Stopping QuickPage daemon" 

	pid=`ps -e | grep qpage | awk '{print $1}'`
	if [ ! -z "$pid" ]; then
		kill $pid > /dev/null 2>&1
	fi
	eend $?
}
exit 0
